(en/decode_coding_object): Fix `after-change-functions`
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 10 Apr 2024 16:15:26 +0000 (12:15 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 10 Apr 2024 16:15:26 +0000 (12:15 -0400)
commit36cb16556c60bf4e703764eefd4fb6668ccc37cc
tree22ea5c9410cef797c7a9a50c8b1de934185d89e5
parent15bafc04322e9c4e85a00fe593239935eb723b6e
(en/decode_coding_object): Fix `after-change-functions`

For `en/decode-coding-string/region`, `after-change-functions`
were either not run at all, or run only after deleting the text
but not after inserting it.

* src/coding.c (decode_coding_object, encode_coding_object): Run the
after-change-functions after inserting the result.

* test/src/editfns-tests.el (sanity-check-change-functions-with-op):
New macro.
(sanity-check-change-functions-errors): New function.
(editfns-tests--before/after-change-functions): Use them to add
cases for `en/decode-coding-string/region`.
src/coding.c
test/src/editfns-tests.el